<?php
/**
 * @author Eureka
 */
class ItemTags extends CActiveRecord
{

	public static function model($className = __CLASS__)
	{
		return parent::model($className);
	}

	public function tableName()
	{
		return 'item_tags';
	}
	
	public function relations()
	{
		return array(
			'tags' => array(
				self::BELONGS_TO , 'Tags','tag_id'
			),
			'items' => array(
				self::BELONGS_TO, 'Items', 'item_id'
			)
		);
	}
	
	public function primaryKey()
	{
		return array('tag_id','item_id');
	}
}